/**

 ║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║
 ║║  ______           _                                                          _                _      ║║
 ║║ |  ____|         | |                               /\                       | |              | |     ║║
 ║║ | |__     _   _  | |_   _   _   _ __    ___       /  \     _ __    _ __     | |        __ _  | |__   ║║
 ║║ |  __|   | | | | | __| | | | | | '__|  / _ \     / /\ \   | '_ \  | '_ \    | |       / _` | | '_ \  ║║
 ║║ | |      | |_| | | |_  | |_| | | |    |  __/    / ____ \  | |_) | | |_) |   | |____  | (_| | | |_) | ║║
 ║║ |_|       \__,_|  \__|  \__,_| |_|     \___|   /_/    \_\ | .__/  | .__/    |______|  \__,_| |_.__/  ║║
 ║║                                                           | |     | |                                ║║
 ║║                                                           |_|     |_|                                ║║
 ║║                                                                                                      ║║
 ║║           ******************************************************************************             ║║
 ║║                                                                                                      ║║
 ║║                 ___                 _      _     ____  _                               _   _         ║║
 ║║                |   \   __ _  __ __ (_)  __| |   |_  / (_)  _ __    _ __    ___   _ _  | | (_)        ║║
 ║║                | |) | / _` | \ V / | | / _` |    / /  | | | '  \  | '  \  / -_) | '_| | | | |        ║║
 ║║                |___/  \__,_|  \_/  |_| \__,_|   /___| |_| |_|_|_| |_|_|_| \___| |_|   |_| |_|        ║║                                
 ║║                ______________________________________________________________________________        ║║
 ║║                                                                                                      ║║
 ║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║║
 

 */
package Cards;

import java.util.Comparator;

/**
 * Future App Lab
 * 
 * 
 * @author David Zimmerli
 *
 */

public  class Card implements Comparable<Card> {
	 String cardName;
	 int cardNumber;
	private String cardColor;
	private int cardPoints;
		
	// Konstruktor
	public Card(){
		
	}
	

	public Card(String cardName,int cardNumber, String cardColor, int cardPoints){
		super();
		this.cardName = cardName;
		this.cardNumber = cardNumber;
		this.cardColor = cardColor;
		this.cardPoints = cardPoints;
	}
	public void setName (String cardName){
		this.cardName = cardName;
	}
	

	public String getCardName() {
		
		return cardName;
	}

	public int getCardNumber() {
		
		return cardNumber;
	}
	public String getCardColor() {
		
		return cardColor;
	}
	
	public int getCardPoints(){
		return cardPoints;
		
	}


	/**
	 * Sorting the Cards after
	 * - Name and then Number
	 * - Number
	 * 
	 * 
	 */
	public static Comparator<Card> cardNumberComparator = new Comparator<Card>() {

		public int compare(Card card1, Card card2) {

		   int cardNumber1 = card1.getCardNumber();
		   int cardNumber2 = card2.getCardNumber();
		   /*For ascending order*/
		   return cardNumber1-cardNumber2;

		   /*For descending order*/
		   //rollno2-rollno1;
	   }};
	   
	   
	   
	   
	    public static Comparator<Card> cardNameComparator = new Comparator<Card>() {

	    	public int compare(Card card1, Card card2) {
	    	   String cardName1 = card1.getCardName();
	    	   String cardName2 = card2.getCardName();

	    	   //ascending order
	    	   return cardName1.compareTo(cardName2);

	    	   //descending order
	    	   //return StudentName2.compareTo(StudentName1);
	        }};


	@Override
	public int compareTo(Card o) {
		// TODO Auto-generated method stub
		return 0;
	}


	
	

}
